
import { appRef } from "@/models/app.ref";
import { NoteInfo, ThumbType } from "@/models/Note";
import { MessagePlugin } from "tdesign-vue-next";
import { BaseServices } from "@/services/base.services";
import { APIUrl, APIMethod, RespInfo } from "@/services/request.services";
import { AccessLogInfo } from "@/models/admin/accesslog";


export class AccessLogService extends BaseServices {
  private static _ins: AccessLogService = new AccessLogService();
  public static get ins(): AccessLogService {
    return this._ins ? this._ins : this._ins = new AccessLogService();
  }
  public list(page: number = 0, number: number = 0): Promise<RespInfo<AccessLogInfo>> {
    const url = APIUrl.Admin_AccessLog + APIMethod.List;
    const data = { page, number };
    return new Promise<RespInfo<AccessLogInfo>>((reslove, reject) => {
      this.request(url, data).then(async (res: RespInfo<AccessLogInfo>) => {
        reslove(res);
      })
    });
  }

}

export const accessLogService: AccessLogService = AccessLogService.ins;